Newer
Older
BlackoutClient / Assets / Best HTTP / Examples / Helpers / Plugins / WebGL / OpenWindow.jslib
@Mark Mark on 30 Jan 2020 436 bytes Added Best HTTP 2 plugin
/*
 * Based on:
 *  https://github.com/valyard/UnityWebGLOpenLink
 */

var OpenWindowPlugin = {
    openWindow: function(link)
    {
    	var url = Pointer_stringify(link);

		var func = function()
        {
        	window.open(url);
        	document.removeEventListener('mouseup', func);
        }

        document.addEventListener('mouseup', func);
    }
};

mergeInto(LibraryManager.library, OpenWindowPlugin);